import { h } from 'vue';
import { NAvatar } from 'naive-ui';
import { BasicColumn } from '@/components/Table';
export interface ListData {
  id: number;
  name: string;
  avatar: string;
  mobile: string;
  industry: string;
  company: string;
  position: string;
  email: string;
  created_at: string;
}

export const columns: BasicColumn<ListData>[] = [
  {
    title: '姓名',
    key: 'name',
  },
  {
    title: '头像',
    key: 'avatar',
    render(record) {
      return h(NAvatar, {
        size: 50,
        src: record.avatar,
      });
    },
  },
  {
    title: '手机号',
    key: 'mobile',
  },
  {
    title: '行业',
    key: 'industry',
  },
  {
    title: '企业',
    key: 'company',
  },
  {
    title: '职位',
    key: 'position',
  },
  {
    title: 'email',
    key: 'email',
  },
  {
    title: '注册时间',
    key: 'created_at',
  },
];
